<template>
  <div flex items-center justify-center>
    <router-link to="/login" mr-5 text-center w-60px decoration-none>
      登录
    </router-link>
    <router-link to="/home" mr-5 text-center w-60px decoration-none>
      列表
    </router-link>
    <router-link to="/about" ml-5 text-center w-60px decoration-none>
      关于
    </router-link>
    <router-link to="/user" ml-5 text-center w-60px decoration-none>
      用户
    </router-link>
  </div>
  <div text-center>
    <router-view></router-view>
  </div>
</template>

<script lang="ts" setup>
import { useRouter } from "vue-router";

const router = useRouter();

if (router.currentRoute.value.path === "/") {
  router.replace("/login");
}
</script>
